def lower_upper(x):
    lst=[]
    for item in x:
        if 'A'<=item<='Z':
            lst.append(chr(ord(item)+32))
        elif 'a'<=item<='z':
            lst.append(chr(ord(item)-32))
        else:lst.append(item)
    return lst

s=input('请输入一串字符：')
lst=lower_upper(s)
print(lst)
